﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Xml;
using System.IO;
using System.Web.Security;
using System.Web.UI;
using System.Timers;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Home_MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string log;
        string path;
        DateTime day = DateTime.Now;
        
        path = "XML.xml";
        Lbluot.Text="Lượt truy cập:" +Application["visiter"].ToString();
        Lbtime.Text = day.ToLongDateString();
        XmlDataDocument doc = new XmlDataDocument();
        string cty = Server.MapPath(path);
        string logo = Server.MapPath("logo.xml");
        DataSet dt = new DataSet();
        DataSet lg = new DataSet();
        dt.ReadXml(cty);
        lg.ReadXml(logo);
        dgcty.DataSource = dt;
        dgcty.DataBind();
        baner.DataSource = dt;
        baner.DataBind();
        dglogo.DataSource = lg;
        dglogo.DataBind();
        //doc.Load(Server.MapPath("Xml.xml"));
        //xmlDataDoc.DataSet.ReadXml(@"C:\ham.xml");
       // doc.DataSet.ReadXml(@path);

       // XmlElement node = doc.DocumentElement;
        log = Request["url"];                    

        switch (log)
        {

            case "register":
                {
                    Response.Redirect("register.aspx");
                    return;
                }

            case "fogot":
                {
                    Response.Redirect("fogot.aspx");
                    return;
                }
        }
    }
}
